<!DOCTYPE html>
<html>
<head>
	<title>pctx.html</title>
	<meta charset="utf-8"/>
	<script src="./bower_components/react/react.js"></script>
	<script src="./bower_components/react/react-dom.js"></script>
	<script src="./bower_components/babel/browser.js"></script>

	<style>
		

	</style>
</head>
<body>
	<div id='app'></div>

	<script type="text/babel">

		function c() {
			return <span>我是函数c</span>
		}

		class Demo extends React.Component {
			render() {
				return <span>我是组件Demo</span>
			}
		}

		function a(val) {
			if (val > 3) {
				return <span>{c()}</span>;
			}else {
				return <Demo />;
			}
		}

		let b = <div>{a(2)}</div>
		ReactDOM.render(b, app);
	</script>

</body>
</html> 